﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BookClubIt.DTO;
using BookClubIt.Data;

namespace BookClubIt.Processor
{
    public class BookProcessor
    {
        BookData bookDataInstance;
        public BookData BookDataInstance
        {
            get
            {
                if (bookDataInstance == null) bookDataInstance = new BookData();
                return bookDataInstance;
            }
        }
       
        public Books GetBooksForClub(int bid)
        {
            return BookDataInstance.GetBooksForClub(bid);
        }

        public Book GetBookByASIN(string A_ASIN)
        {
            return BookDataInstance.GetBookByASIN(A_ASIN);
        }
        public Book GetCurrentBook(int bid)
        {
            return BookDataInstance.GetCurrentBook(bid);
        }
        public Book GetBookById(int id)
        {
            return BookDataInstance.GetBookById(id);
        }

        public Book SaveBook(DTO.Book book)
        {
            return BookDataInstance.SaveBook(book);
        }
        public bool haveBookInDb(string asin)
        {
            return BookDataInstance.haveBookInDb(asin);
        }
    }
}
